package com.training.jdbc;

import java.util.List;

public class CarDAOJDBCImplDemo {

	public static void main(String[] args) throws DAOException {
		
		CarDAO dao = new CarDAOJDBCImpl("jdbc:oracle:thin:@localhost:1521:xe", "car", "car");
		
		List<Car> cars = dao.getAllCars();
		
		for (Car car : cars) {
			
			System.out.println("VIN of the Car is " + car.getVinNumber());
			System.out.println("Make of the Car is " + car.getMake());
			System.out.println("Model of the Car is " + car.getModel());
			System.out.println("Year of the Car is " + car.getYear());
			System.out.println("*****************************");
			
		}
		
		
		/*Car car = new Car("123", "Dodge", "Challenger", 2009);
		
		dao.addCar(car);
		*/

	}

}
